import java.awt.event.*;
class key extends KeyAdapter{
		she s;
		public key(she c){
			this.s = c;
			System.out.println("vvvvvv");
		}

        public void keyPressed(KeyEvent e){  
            if(e.getKeyCode()==KeyEvent.VK_UP) {
            	s.ctrlDir(4);
            	System.out.println("   up  ;");
            }
            if(e.getKeyCode()==KeyEvent.VK_LEFT){
            	s.ctrlDir(3);
            	System.out.println("   left  ;");
            }
            if(e.getKeyCode()==KeyEvent.VK_RIGHT){
            	s.ctrlDir(1);
            	System.out.println("  right  ;");
            }
            if(e.getKeyCode()==KeyEvent.VK_DOWN){
            	s.ctrlDir(2);
            	System.out.println("   down  ;");
            }
        }  
    }  
